<?php
namespace App\Http\Controllers\Front;

class IndexController extends BaseController
{
    //前台

    public function getIndex()
    {
        header("Access-Control-Allow-Origin: *");
        //搜索词
        $searchArys = [
            [ 'id' => 1, 'title' => '平面设计' ],
            [ 'id' => 2, 'title' => '家装设计' ],
            [ 'id' => 3, 'title' => 'AI绘图' ],
        ];
        //可以找到
        $findArys = [
            [ 'id' => 1, 'title' => '专业的版权知产服务', 'icon' => '',
                'describe' => '帮助企业维护权益以及申请资质 以提高企业'
            ],
        ];
        //版权服务
        $copyrightArys = [
            [ 'id' => 1, 'title' => '工程资质申报', 'icon' => '' ],
            [ 'id' => 2, 'title' => '版权服务', 'icon' => '' ],
            [ 'id' => 3, 'title' => '商标服务', 'icon' => '' ],
        ];
        //律师事务所
        $lawFirmArys = [
            [ 'id' => 1, 'title' => '工程资质申报', 'icon' => '' ],
        ];
        //律师
        $lawyerArys = [
            [ 'id' => 1, 'title' => '张律师', 'head' => '',
                'fulltime' => '专职', 'workUnit' => '山东某某律师事务所',
                'tagList' => [ '成立10年', '知识产权', '刑事诉讼', '合同纠纷', ],
            ],
        ];
        //案例
        $caseArys = [
            [ 'id' => 1, 'img' => '' ],
        ];
        //设计商城
        $designShopArys = [
            [ 'id' => 1, 'shopImg' => '', 'shopName' => '企业名称',
                'designer' => '设计师名称', 'designHead' => ''
            ],
        ];
        //设备商城
        $deviceShopArys = [
            [ 'id' => 1, 'title' => '', 'img' => '' ],
        ];
        //文创商城
        $createShopArys = [
            [ 'id' => 1, 'img' => '' ],
            [ 'id' => 2, 'img' => '' ],
            [ 'id' => 3, 'img' => '' ],
            [ 'id' => 4, 'img' => '' ],
            [ 'id' => 5, 'img' => '' ],
            [ 'id' => 6, 'img' => '' ],
        ];
        //软件
        $softArys = [
            [ 'id' => 1, 'title' => '3D建模', 'img' => '' ],
        ];
        //学院
        $schoolArys = [
            [ 'id' => 1, 'title' => '软件基础课程', 'img' => '',
                'designer' => '设计师名称', 'playNum' => 0,
            ],
        ];
        $res = [
            'searchList' => $searchArys,
            'findList' => $findArys,
            'copyrightList' => $copyrightArys,
            'lawFirmList' => $lawFirmArys,
            'lawyerList' => $lawyerArys,
            'caseList' => $caseArys,
            'designShopList' => $designShopArys,
            'deviceShopList' => $deviceShopArys,
            'createShopList' => $createShopArys,
            'softList' => $softArys,
            'schoolList' => $schoolArys,
        ];
        return $this->toJson(0, '', $res);
    }

    //知识产权二级页面
    public function getPropertyList()
    {
        header("Access-Control-Allow-Origin: *");
        $res = ['lawFirm' => [], 'lawyer' => []];
        $res['lawFirm'][] = [
            'id' => 1,
            'companyName' => '山东张律律师事务所',
            'icon' => '',
            'mainBusy' => '版权查询、版权登记',
            'intro' => '从分享时刻、分析形式、分享动机...',
            'price' => 1699,
        ];
        $res['lawyer'][] = [
            'id' => 1,
            'title' => '张律师',
            'head' => '',
            'levelName' => '等级名称',
            'serial' => '123456789',
            'companyName' => '山东张律律师事务所',
            'tagList' => ['专利申请', '商标注册'],
        ];
        return $this->toJson(0, '', $res);
    }

    //名所
    public function getLawFirmOne()
    {
        header("Access-Control-Allow-Origin: *");
        $res = [
            'id' => 1,
            'companyName' => '山东张律律师事务所',
            'head' => '',
            'tagList' => ['知识产权', '合同纠纷'],
            'intro' => [
                'yytime' => '周一至周六 9:00-18:00',
                'address' => '浙江省杭州市拱墅区万达广场A座1111室',
            ],
            'serveList' => [
                [ 'id' => 1, 'title' => '知识产权',
                    'detail' => '为企业提供高价值的产业链。。。',
                    'price' => 49, 'unit' => '20分钟',
                ],
            ],
            'teamList' => [
                [ 'id' => 1, 'lawyer' => '张律师', 'head' => '', 'detail' => '' ]
            ],
        ];
        return $this->toJson(0, '', $res);
    }

    //名师
    public function getLawyerOne()
    {
        header("Access-Control-Allow-Origin: *");
        $res = [
            'id' => 1,
            'lawyerName' => '山东张律律师事务所',
            'head' => '',
            'tagList' => ['知识产权', '合同纠纷', '专职律师'],
            'intro' => '某某律师事务所...',
            'serveList' => ['知识产权', '合同纠纷'],
            'workInfo' => [
                'company' => '某某律师事务所',
                'serial' => '12346789',
                'area' => '山东省-济南市-历城区',
                'serveTime' => '9:00-18:00',
                'fulltime' => '专职律师',
            ],
            'honorList' => [
                ['id' => 1, 'addtime' => '2024-01-01', 'title' => '优秀律师', 'unit' => '济南市司法局'],
            ],
            'queList' => [
                ['id' => 1, 'title' => '起诉是先收到短信还是先传票', 'answer' => '被起诉一般法院会...']
            ],
        ];
        return $this->toJson(0, '', $res);
    }
}